package com.noob.design.simplefactory;

import com.noob.design.simplefactory.impl.Cat;
import com.noob.design.simplefactory.impl.Dog;

public class AnimalsFactory {

    public static Animals createAnimals(String type){
        if ("dog".equals(type)){
            return new Dog();
        }else if ("cat".equals(type)){
            return new Cat();
        }else {
            return null;
        }
    }
}
